package com.flute.framework.search.result;

import java.io.Serializable;

import com.flute.tools.data.DataRecord;

/**
 * lucene搜索结果所包含的信息，包括lucene的Document对象，文档在索引中的id，以及本次搜索该文档的得分
 * 
 * @author Dave
 * 
 */
public class ResultInfo implements Serializable  {
	private static final long serialVersionUID = -8028168489148120241L;
	private DataRecord propertyList;

	public ResultInfo() {
		this.propertyList = new DataRecord();
	}

	public void addProperty(String name, String value) {
		this.propertyList.AddField(name, value);
	}

	public String[] getAllProperties() {
		return propertyList.getAllFields();
	}

	public String getPropertyValue(String name) {
		return propertyList.getFieldValue(name);
	}

	public DataRecord getPropertyList() {
		return this.propertyList;
	}
	
	public void deleteProperty(String name){
		propertyList.deleteField(name);
	}
}
